package org.jeecg.modules.personnelInformation.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import org.jeecg.modules.personnelInformation.entity.PersonnelInformation;
import org.jeecg.modules.personnelInformation.mapper.PersonnelInformationMapper;
import org.jeecg.modules.personnelInformation.service.IPersonnelInformationService;
import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

/**
 * @Description: 人员信息采集数据表
 * @Author: jeecg-boot
 * @Date:   2024-07-23
 * @Version: V1.0
 */
@Service
public class PersonnelInformationServiceImpl extends ServiceImpl<PersonnelInformationMapper, PersonnelInformation> implements IPersonnelInformationService {

    @Override
    public PersonnelInformation getByOpenId(String openId) {
        LambdaQueryWrapper<PersonnelInformation> wrapper = Wrappers.lambdaQuery();
        wrapper.eq(PersonnelInformation::getOpenId, openId);
        return baseMapper.selectOne(wrapper);
    }
}
